﻿//using InfluxDB.Client;
//using Microsoft.Extensions.DependencyInjection;
//using WH.Common.Config.Options;
//using System;
//using System.Collections.Generic;
//using System.Linq;
//using System.Text;
//using System.Threading.Tasks;

//namespace WH.Extensions.Setup
//{
//    public static class InfluxDbSetup
//    {
//        public static void AddInfluxDbSetup(this IServiceCollection services, EnergyOptions options)
//        {
//            var opt = new InfluxDBClientOptions(options.Influxdb.Address)
//            {
//                Token = options.Influxdb.Token,
//                Timeout = TimeSpan.FromMinutes(1)
//            };
//            var client = new InfluxDBClient(opt);

//            services.AddSingleton<IInfluxDBClient>((s) =>
//            {
//                return client;
//            });
//        }
//    }
//}
